package com.acsior.hibernate.vo;

// default package

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * SecWorkplace entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "sec_workplaces")
@GeneratorKey(tableName = "sec_workplaces")
public class SecWorkplaceVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = -3066561880575279253L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "structure_id", nullable = false)
	private StructureVO structure;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "workplace_os_id", nullable = false)
	private NomWorkplaceOsVO nomWorkplaceOs;

	@Column(name = "barcode", length = 13)
	private String barcode;

	@Column(name = "has_fiscal_aparatus", nullable = false)
	private boolean hasFiscalAparatus;

	@Column(name = "works_terminal", nullable = false)
	private boolean worksTerminal;

	@Column(name = "description")
	private String description;

	@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "workplaces")
	private List<EmployeeVO> employees;

	@Column(name = "is_active", nullable = false)
	private boolean isActive;

	// Constructors

	/** default constructor */
	public SecWorkplaceVO() {
		this.employees = new ArrayList<EmployeeVO>();
	}

	
	/**
	 * @return стойността на structure
	 */
	public StructureVO getStructure() {
		return this.structure;
	}

	
	/**
	 * @param structure се залага в structure
	 */
	public void setStructure(StructureVO structure) {
		this.structure = structure;
	}

	
	/**
	 * @return стойността на nomWorkplaceOs
	 */
	public NomWorkplaceOsVO getNomWorkplaceOs() {
		return this.nomWorkplaceOs;
	}

	
	/**
	 * @param nomWorkplaceOs се залага в nomWorkplaceOs
	 */
	public void setNomWorkplaceOs(NomWorkplaceOsVO nomWorkplaceOs) {
		this.nomWorkplaceOs = nomWorkplaceOs;
	}

	
	/**
	 * @return стойността на barcode
	 */
	public String getBarcode() {
		return this.barcode;
	}

	
	/**
	 * @param barcode се залага в barcode
	 */
	public void setBarcode(String barcode) {
		this.barcode = barcode;
	}

	
	/**
	 * @return стойността на hasFiscalAparatus
	 */
	public boolean isHasFiscalAparatus() {
		return this.hasFiscalAparatus;
	}

	
	/**
	 * @param hasFiscalAparatus се залага в hasFiscalAparatus
	 */
	public void setHasFiscalAparatus(boolean hasFiscalAparatus) {
		this.hasFiscalAparatus = hasFiscalAparatus;
	}

	
	/**
	 * @return стойността на worksTerminal
	 */
	public boolean isWorksTerminal() {
		return this.worksTerminal;
	}

	
	/**
	 * @param worksTerminal се залага в worksTerminal
	 */
	public void setWorksTerminal(boolean worksTerminal) {
		this.worksTerminal = worksTerminal;
	}

	
	/**
	 * @return стойността на description
	 */
	public String getDescription() {
		return this.description;
	}

	
	/**
	 * @param description се залага в description
	 */
	public void setDescription(String description) {
		this.description = description;
	}


	
	/**
	 * @return стойността на employees
	 */
	public List<EmployeeVO> getEmployees() {
		return this.employees;
	}


	
	/**
	 * @param employees се залага в employees
	 */
	public void setEmployees(List<EmployeeVO> employees) {
		this.employees = employees;
	}


	
	/**
	 * @return стойността на isActive
	 */
	public boolean isActive() {
		return this.isActive;
	}


	
	/**
	 * @param isActive се залага в isActive
	 */
	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

}